﻿package ${config.packageName}<#if table.packageName?exists>${table.packageName}</#if>${entity.packageName};

import net.paoding.rose.web.annotation.Path;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.annotation.rest.Post;

import javax.annotation.Resource;

import com.jpgk.web.controllers.BaseController;
import com.jpgk.web.controllers.required.LoginRequired;
import ${config.packageName}.service<#if table.packageName?exists>${table.packageName}</#if>.I${table.entityName}Service;
/**
 * ${table.comment}视图控制类
 * 此类由IKForm平台自定义业务对象生成
 * @author Inkcar<inkcaridge@qq.com>
 * @since 1.0
 */
@LoginRequired
@Path("${table.entityName}")
public class ${table.entityName}<#if entity.suffix?exists>${entity.suffix}</#if> extends BaseController {
	@Resource(name = "${table.entityName}Service")
	private I${table.entityName}Service service;

	/**
	 * @return the service
	 */
	public I${table.entityName}Service getService() {
		return service;
	}

	/**
	 * @param service
	 *            the service to set
	 */
	public void setService(I${table.entityName}Service service) {
		this.service = service;
	}

	@Get("list")
	public String list() {
		return super.list();
	}

	@Get("detail")
	public String detail() {
		return super.detail();
	}

	@Post("save")
	public String save() {
		return super.save();
	}

	@Get("delete")
	public String delete() {
		return super.delete();
	}
	<#if table.tree?exists>
    @Get("tree")
    public String tree() {
        return super.tree();
    }
    </#if>
}
